home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
pcb.h.z
/
pcb.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
4KB
|
114 lines
#ifndef __SYS_PCB_H__
#define __SYS_PCB_H__
/**************************************************************************
* *
* Copyright (C) 1990, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
**************************************************************************/
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/*#ident "@(#)kern-port:sys/pcb.h 10.1"*/
#ident "$Revision: 3.9 $"
/*
* MIPS process control block
*/
/*
* pcb_regs indices
*/
#define PCB_S0 0 /* callee saved regs.... */
#define PCB_S1 1
#define PCB_S2 2
#define PCB_S3 3
#define PCB_S4 4
#define PCB_S5 5
#define PCB_S6 6
#define PCB_S7 7
#define PCB_SP 8 /* stack pointer */
#define PCB_FP 9 /* frame pointer */
#define PCB_PC 10 /* program counter */
#define PCB_SR 11 /* C0 status register */
#define PCB_LIOMSK 12 /* IP6 local interrupt mask register */
#define NPCBREGS 13 /* number of regs saved at ctxt switch */
#ifdef _KERNEL
/*
* jmp_buf offsets
*/
#define JB_S0 0 /* callee saved regs.... */
#define JB_S1 1
#define JB_S2 2
#define JB_S3 3
#define JB_S4 4
#define JB_S5 5
#define JB_S6 6
#define JB_S7 7
#define JB_SP 8 /* stack pointer */
#define JB_FP 9 /* frame pointer */
#define JB_PC 10 /* program counter */
#define JB_SR 11 /* C0 status register */
#define JB_LIOMSK 12 /* IP6 local interrupt mask register */
#define NJBREGS 13
#endif /* _KERNEL */
/*
* single step information
* used to hold instructions that have been replaced by break's when
* single stepping
*/
struct ssi {
int ssi_cnt; /* number of bp's installed */
struct ssi_bp {
unsigned *bp_addr; /* address of replaced instruction */
unsigned bp_inst; /* replaced instruction */
} ssi_bp[2];
};
typedef struct pcb
{
/*
* General purpose registers saved at context switch time.
*
* NOTE: current switch assembler code assumes that
* pcb_regs is the first thing in the pcb.
*/
int pcb_regs[NPCBREGS];
int pcb_resched; /* non-zero if time to resched */
/* These are use in branch delay instruction emulation */
int pcb_bd_epc; /* epc register */
int pcb_bd_cause; /* cause register */
int pcb_bd_ra; /* address to return to if doing bd emulation */
int pcb_bd_instr; /* the branch instr for the bd emulation */
/* This is use in fp instruction emulation */
int pcb_softfp_pc; /* resulting pc after fp emulation */
/*
* Space for the state of all the potential coprocessors. WASTEFUL!
*/
double pcb_align; /* 8-byte align for R4K sdc1/ldc1 for fpregs */
int pcb_fpregs[32]; /* floating point */
int pcb_fpc_csr; /* floating point control and status reg */
int pcb_fpc_eir; /* floating point exception instruction reg */
int pcb_ownedfp; /* has owned fp at one time */
/*int pcb_c2regs[32]; /* TBD */
/*int pcb_c3regs[32]; /* TBD */
int pcb_sstep; /* non-zero if single stepping */
struct ssi pcb_ssi; /* single step state info */
} pcb_t;
#define PCB(x) (u.u_pcb.x)
#endif /* __SYS_PCB_H__ */